package net.tv90.bfmccore.game.impl.vehicle;

import lombok.AllArgsConstructor;
import lombok.Data;
import net.tv90.bfmccore.code.VehicleMenu;
import net.tv90.bfmccore.code.VehicleMenuAssets;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
public class VehicleGroup {
    String type;
    String pointIndex;
    List<String> vehicles;
    boolean specialVehicle;

    public List<VehicleMenu> toMenu() {
        List<VehicleMenu> menus = new ArrayList<>();
        for (String vehicle : vehicles) {
            if (VehicleMenuAssets.vehicles.containsKey(vehicle)) {
                menus.add(VehicleMenuAssets.vehicles.get(vehicle));
            }
        }
        return menus;
    }
}
